
import 'package:secend_flutter/bean/home_common_model_bean.dart';

class GridNavBean{
  final GridNavItem hotel;
  final GridNavItem flight;
  final GridNavItem travel;

  GridNavBean(
      {required this.hotel, required this.flight, required this.travel});

  factory GridNavBean.fromJson(Map<String, dynamic> json) {
    return GridNavBean(
      hotel: GridNavItem.fromJson(json['hotel']),
      flight: GridNavItem.fromJson(json['flight']),
      travel: GridNavItem.fromJson(json['travel']),
    );
  }
}

class GridNavItem {
  final String startColor;
  final String endColor;
  final CommonBean mainItem;
  final CommonBean item1;
  final CommonBean item2;
  final CommonBean item3;
  final CommonBean item4;

  GridNavItem(
      {required this.startColor,
        required this.endColor,
        required this.mainItem,
        required this.item1,
        required this.item2,
        required this.item3,
        required this.item4});

  factory GridNavItem.fromJson(Map<String, dynamic> json) {
    return GridNavItem(
      startColor: json['startColor'],
      endColor: json['endColor'],
      mainItem: CommonBean.fromJson(json['mainItem']),
      item1: CommonBean.fromJson(json['item1']),
      item2: CommonBean.fromJson(json['item2']),
      item3: CommonBean.fromJson(json['item3']),
      item4: CommonBean.fromJson(json['item4']),
    );
  }
}